home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-websites-
/
wirenet
/
files
/
dashboard2.lha
/
Dashboard2
/
AmiTCP
/
Dashboard
next >
Wrap
Text File
|
1998-04-23
|
22KB
|
796 lines
G4C
; $VER: Dashboard 2.0 (25.3.98)
; (c) Neil Bothwick
;;;OnLoad
xONLOAD ; To be done on loading the GUI
Set OUTPUT CON:450/678/400/90/Dashboard/CLOSE/INACTIVE/AUTO
;Set OUTPUT NIL:
MainGui = 'Dashboard'
GOSUB $MainGui SetUp
;;;
;;; OnReload
xONRELOAD ; Or reloading the GUI
Set OUTPUT CON:350/658/500/110/Dashboard/CLOSE/INACTIVE/AUTO
;Set OUTPUT NIL:
MainGui = 'Dashboard'
GOSUB $MainGui SetUp
;;;
;;; Define main window
WINBIG 15 15 339 131 'Wirenet Dashboard' ; Specify a window
WINTYPE 0111000
BOX 0 56 339 2 OUT RIDGE
xOnOpen
ChangeArg $MainGui 240 4 '$ButtonA'
ChangeArg $MainGui 250 4 '$ButtonB'
ChangeArg $MainGui 241 1 '$ButtonA'
ChangeArg $MainGui 251 1 '$ButtonB'
;;;
;;; Connect
xBUTTON 5 2 160 16 '_Connect'
GadID 100
GadHelp 'Connects, or sends events if already online'
GOSUB $MainGui Connect
xCYCLER 175 2 160 16 '' 'ConnectOpt'
GadID 130
GadHelp 'What happens after connecting'
GadKey 1
CSTR 'Open (1)' Open
CSTR 'Mail (1)' Mail
CSTR 'News (1)' News
CSTR 'AutoMail (1)' AutoMail
CSTR 'AutoNews (1)' AutoNews
xROUTINE Connect
if $ConnectOpt == 'Open'
ConnectOpt = ''
EndIf
GOSUB $MainGui BusyRun 'Connect $ConnectOpt'
;;;
;;; Disconnect
xBUTTON 5 19 160 16 '_Disconnect'
GadID 110
GadHelp 'Disconnects, immediately or when transfers finish'
GOSUB $MainGui Disconnect
xCYCLER 175 19 160 16 '' 'DisconnnectOpt'
GadID 140
GadHelp 'Whether to disconnect now or when transfers are complete'
GadKey 2
CSTR 'Now (2)' Now
CSTR 'Wait (2)' Wait
xROUTINE Disconnect
if $DisconnectOpt == 'Now'
DisconnectOpt = ''
EndIf
GOSUB $MainGui BusyRun 'Disconnect $DisconnnectOpt'
;;;
;;; Get
xBUTTON 5 36 160 16 '_Get'
GadID 120
GadHelp 'Fetches mail and/or news, according to cycle gadget setting'
GOSUB $MainGui Get
xCYCLER 175 36 160 16 '' 'GetOpt'
GadID 150
GadHelp 'Selects whether Get fetches mail, news of both'
GadKey 3
CSTR 'Mail (3)' Mail
CSTR 'News (3)' News
CSTR 'All (3)' All
xROUTINE Get
GOSUB $MainGui BusyRun 'Run >NIL: Fetch $GetOpt'
;;;
;;; WWW
xBUTTON 5 62 160 16 '_World Wide Web'
GadID 200
GadHelp 'Starts your chosen Web browser'
GOSUB $MainGui WWW
xROUTINE WWW
GOSUB $MainGui BusyRun 'RUN >NIL: $WWW'
;;;
;;; Browse news
xBUTTON 5 79 160 16 '_Browse News'
GadID 220
GadHelp 'Starts the online news browser'
GOSUB $MainGui BrowseNews
xROUTINE BrowseNews
CLI 'CheckOnline >NIL:'
If $$RETCODE = 0
GOSUB $MainGui BusyRun 'RUN >NIL: $Browse'
Else
GuiWindow $MainGui WAIT
EZReq 'You need to be online to use this function' 'OK' nil
GuiWindow $MainGui RESUME
EndIf
;;;
;;; User A
xBUTTON 5 96 160 15 ' '
GadID 240
GadHelp 'This button is user configurable, see Help for more information'
GadKey 4
GOSUB $MainGui UserA
xROUTINE UserA
GOSUB $MainGui BusyRun '$UserA'
;;;
;;; Exit
xBUTTON 5 113 160 16 'E_xit'
GadID 260
GadHelp 'Closes Dashboard, leaving other programs running'
Quit
;;;
;;; FTP
xBUTTON 175 62 160 16 '_File Transfer'
GadID 210
GadHelp 'Starts your chosen FTP program'
GOSUB $MainGui FTP
xROUTINE FTP
GOSUB $MainGui BusyRun 'RUN >NIL: $FTP'
;;;
;;; Mail/News
xBUTTON 175 79 160 16 '_Read Mail/News'
GadID 230
GadHelp 'Starts Thor to read mail and news offline'
GOSUB $MainGui ReadNews
xROUTINE ReadNews
GOSUB $MainGui BusyRun 'Run >NIL: $Read'
;;;
;;; User B
xBUTTON 175 96 160 16 ' '
GadID 250
GadHelp 'This button is user configurable, see Help for more information'
GadKey 5
GOSUB $MainGui UserB
xROUTINE UserB
GOSUB $MainGui BusyRun '$UserB'
;;;
;;; Quit
xBUTTON 175 113 160 16 'Quit'
GadID 270
GadHelp 'Quits Dashboard, closing TCP and taking you offline'
GOSUB $MainGui Quit
xROUTINE Quit
GuiWindow $MainGui WAIT
CLI 'StopNet'
if $$RETCODE = 0
GuiClose $MainGui
Quit
endif
GuiWindow $MainGui RESUME
;;;
;;; Project Menu
xMENU 'Project' 'Help' '' 'H'
RUN 'MultiView Wirenet:doc/Dashboard.guide'
xMENU 'Project' 'About' '' '?'
AboutMsg = 'Wirenet Dashboard 2.0 (c) Neil Bothwick, 1996-7\nCreated using Gui4Cli by D.C.Keletsekis'
EZReq '$AboutMsg' 'OK' nil
xMENU 'Project' 'Prefs...' '' 'P'
GuiClose $MainGui
GuiOpen $PrefsGui
GuiWindow $PrefsGui WAIT
RUN 'WirenetPrefs COPY'
GuiWindow $PrefsGui RESUME
xMENU 'Project' 'Exit' '' 'X'
Quit
xMENU 'Project' 'Quit' '' 'Q'
GOSUB $MainGui Quit
;;;
;;;Commands menu
xMENU 'Command' 'Connect' 'Open' ''
Update $MainGui 130 0
GOSUB $MainGui Connect
xMENU 'Command' 'Connect' 'Mail' ''
Update $MainGui 130 1
GOSUB $MainGui Connect
xMENU 'Command' 'Connect' 'News' ''
Update $MainGui 130 2
GOSUB $MainGui Connect
xMENU 'Command' 'Connect' 'AutoMail' ''
Update $MainGui 130 3
GOSUB $MainGui Connect
xMENU 'Command' 'Connect' 'AutoNews' ''
Update $MainGui 130 4
GOSUB $MainGui Connect
xMENU 'Command' 'Disconnect' 'Now' ''
Update $MainGui 140 0
GOSUB $MainGui Disconnect
xMENU 'Command' 'Disconnect' 'Wait' ''
Update $MainGui 140 1
GOSUB $MainGui Disconnect
xMENU 'Command' 'Get' 'Mail' ''
Update $MainGui 150 0
GOSUB $MainGui Get
xMENU 'Command' 'Get' 'News' ''
Update $MainGui 150 1
GOSUB $MainGui Get
xMENU 'Command' 'Get' 'All' ''
Update $MainGui 150 2
GOSUB $MainGui Get
xMENU 'Command' 'WWW' '' ''
GOSUB $MainGui WWW
xMenu 'Command' 'FTP' '' ''
GOSUB $MainGui FTP
xMENU 'Command' 'Browse News' '' ''
GOSUB $MainGui BrowseNews
xMENU 'Command' 'Read Mail/News' '' ''
GOSUB $MainGui ReadNews
xMENU 'Command' 'User A ' '' ''
GadID 241
GOSUB $MainGui UserA
xMENU 'Command' 'User B ' '' ''
GadID 251
GOSUB $MainGui UserB
;;;
;;; Initial setup
xROUTINE SetUp
; SET DEBUG ON
SET HELP ON
CD 'Wirenet:bin'
PrefsGui = 'Prefs.g'
DialerGui = 'Dialer.g'
AddressGui = 'Address.g'
UserGui = 'User.g'
FTPGui = 'FTP.g'
PrefsFile = 'Wirenet.prefs'
PrefsPath = 'ENV:$PrefsFile'
Set EDITOR "Run >NIL: c:dme"
GOSUB $MainGui BusyRun 'Wirenet:bin/StartNet'
GOSUB $MainGui ReadConfig
Update $MainGui 130 1
Update $MainGui 140 0
Update $MainGui 150 1
ChangeArg $MainGui 240 4 '$ButtonA'
ChangeArg $MainGui 250 4 '$ButtonB'
ChangeArg $MainGui 241 1 '$ButtonA'
ChangeArg $MainGui 251 1 '$ButtonB'
GuiOpen $MainGui ; Open the GUI's window
Return
;;;
;;; Read configuration
xROUTINE ReadConfig
CLI 'rx "say getclip(""ButtonA"")" >ENV:.temp'
ButtonA = $.temp
CLI 'rx "say getclip(""ButtonB"")" >ENV:.temp'
ButtonB = $.temp
CLI 'rx "say getclip(""WWW"")" >ENV:.temp'
WWW = $.temp
CLI 'rx "say getclip(""FTP"")" >ENV:.temp'
FTP = $.temp
;WWW = 'AWeb3:Aweb-II'
;FTP = 'Wirenet:AmiFTP'
Read = 'Wirenet:Thor/Thor System=Wirenet FF'
Browse = 'Wirenet:Thor/ConnectThor Wirenet BROWSENEWS'
UserA = 'Wirenet:UserScripts/Function.A'
UserB = 'Wirenet:UserScripts/Function.B'
Return
;;;
;;; BusyRun
xROUTINE BusyRun BusyCmd
GuiWindow $MainGui WAIT
say "$BusyCmd\n"
CLI '$BusyCmd'
GuiWindow $MainGui RESUME
Return
;;;
;;; Use Prefs
xROUTINE UsePrefs
GuiWindow $PrefsGui WAIT
CLI 'Delete >NIL: $PrefsPath'
CLI 'Echo "# Wirenet preferences file" >T:$PrefsFile'
Append T:$PrefsFile '\n# Dialer preferences\n'
Append T:$PrefsFile 'PopNum: $PopNum\n'
Append T:$PrefsFile 'ModemDev: $ModemDev\n'
Append T:$PrefsFile 'ModemSpeed: $ModemSpeed\n'
Append T:$PrefsFile 'ModemInit: $ModemInit\n'
Append T:$PrefsFile 'ModemDial: $ModemDial\n'
Append T:$PrefsFile 'PPPoptions: $PPPoptions\n'
Append T:$PrefsFile 'MTU: $MTU\n'
Append T:$PrefsFile 'DialWindow: $DialWindow\n'
Append T:$PrefsFile 'UsePAP: $UsePAP\n'
Append T:$PrefsFile 'TCPstack: $TCPstack\n'
Append T:$PrefsFile '\n# User preferences\n'
Append T:$PrefsFile 'UserName: $UserName\n'
Append T:$PrefsFile 'NodeName: $NodeName\n'
Append T:$PrefsFile 'MailBox: $MailBox\n'
Append T:$PrefsFile 'DomainName: $DomainName\n'
Append T:$PrefsFile 'IPAddress: $IPAddress\n'
Append T:$PrefsFile 'Password: $Password\n'
Append T:$PrefsFile '\n# Address preferences\n'
Append T:$PrefsFile 'Gateway: $Gateway\n'
Append T:$PrefsFile 'MailServer: $MailServer\n'
Append T:$PrefsFile 'NewsServer: $NewsServer\n'
Append T:$PrefsFile 'SMTPServer: $SMTPServer\n'
Append T:$PrefsFile 'NewsSockets: $NewsSockets\n'
Append T:$PrefsFile 'MaxTries: $MaxTries\n'
Append T:$PrefsFile '\n# FTP preferences\n'
Append T:$PrefsFile 'AminetServer: $AminetServer\n'
Append T:$PrefsFile 'DownloadDir: $DownloadDir\n'
Append T:$PrefsFile 'AminetRoot: $AminetRoot\n'
Append T:$PrefsFile 'GetReadme: $GetReadme\n'
Append T:$PrefsFile 'WWW: $WWW\n'
Append T:$PrefsFile 'FTP: $FTP\n'
Append T:$PrefsFile 'ButtonA: $ButtonA\n'
Append T:$PrefsFile 'ButtonB: $ButtonB\n'
CLI 'Copy T:$PrefsFile $PrefsPath clone'
CLI 'Delete >NIL: T:$PrefsFile'
CLI 'WirenetPrefs LOAD'
GuiWindow $PrefsGui RESUME
Return
;;;
;;; *** Prefs Window ***
NEWFILE Prefs.g
VarPath 'Dashboard'
WINBIG 15 15 285 90 'Wirenet Preferences' ; Specify a window
WINTYPE 0111000
;;;
;;; Dialer
xBUTTON 15 5 120 20 '_Dialer'
GadHelp 'Edit dialer preferences'
GuiClose $PrefsGui
GuiOpen $DialerGui
;;;
;;; Addresses
xBUTTON 150 5 120 20 '_Addresses'
GadHelp 'Change system addresses'
GuiClose $PrefsGui
GuiOpen $AddressGui
;;;
;;; User
xBUTTON 15 30 120 20 '_User'
GadHelp 'Edit user information'
GuiClose $PrefsGui
GuiOpen $UserGui
;;;
;;; FTP
xBUTTON 150 30 120 20 '_FTP'
GadHelp 'Change settings for Aminet downloads via Thor'
GuiClose $PrefsGui
GuiOpen $FTPGui
;;;
;;; Save
xBUTTON 15 60 61 20 '_Save'
GadHelp 'Save preferences'
Gosub $MainGui UsePrefs
CLI 'Copy >NIL: $PrefsPath ENVARC:'
Gosub $PrefsGui ExitPrefs
;;;
;;; Use
xBUTTON 112 60 61 20 '_Use'
GadHelp 'Use preferences for this session'
Gosub $MainGui UsePrefs
Gosub $PrefsGui ExitPrefs
;;;
;;; Cancel
xBUTTON 209 60 61 20 '_Cancel'
GadHelp 'Exit without making any changes'
Gosub $PrefsGui ExitPrefs
;;;
;;; Menu
xMENU 'Project' 'Last Saved' '' 'L'
GuiWindow $PrefsGui WAIT
CLI 'Copy >NIL: ENVARC:$PrefsFile ENV:'
CLI 'WirenetPrefs LOAD'
RUN 'WirenetPrefs COPY'
GuiWindow $PrefsGui RESUME
xMENU 'Project' 'Help' '' 'H'
RUN 'MultiView Wirenet:doc/Dashboard.guide'
;;;
;;; Exit Prefs
xROUTINE ExitPrefs
; GuiWindow $PrefsGui WAIT
; CLI 'WirenetPrefs LOAD'
; GuiWindow $PrefsGui RESUME
GuiClose 'Prefs.g'
GuiOpen 'Dashboard' ;$MainGui
Return
;;;
;;; *** Dialer Window ***
NEWFILE Dialer.g
VarPath 'Dashboard'
WINBIG 15 15 575 180 'Dialer Preferences'
WINTYPE 0111000
;;;
;;; On Open
xOnOPEN
PopNum.tmp = $PopNum
ModemDev.tmp = $ModemDev
MTU.tmp = $MTU
PPPoptions.tmp = $PPPoptions
ModemInit.tmp = $ModemInit
ModemDial.tmp = $ModemDial
DialWindow.tmp = $DialWindow
UsePAP.tmp = $UsePAP
TCPstack.tmp = $TCPstack
ModemSpeed.tmp = 2 ; default to 38400
DoCase $ModemSpeed
Case = 115200
ModemSpeed.tmp = 0
Break
Case = 57600
ModemSpeed.tmp = 1
Break
Case = 38400
ModemSpeed.tmp = 2
Break
Case = 19200
ModemSpeed.tmp = 3
Break
Case = 9600
ModemSpeed.tmp = 4
Break
Case = 4800
ModemSpeed.tmp = 5
Break
Case = 2400
ModemSpeed.tmp = 6
Break
EndCase
Update $DialerGui 410 $ModemDev.tmp
Update $DialerGui 420 $ModemSpeed.tmp
Update $DialerGui 430 $ModemInit.tmp
Update $DialerGui 440 $ModemDial.tmp
Update $DialerGui 450 $PopNum.tmp
Update $DialerGui 460 $MTU.tmp
Update $DialerGui 470 $PPPoptions.tmp
Update $DialerGui 480 $DialWindow.tmp
Update $DialerGui 490 $UsePAP.tmp
Update $DialerGui 495 $TCPstack.tmp
;;;
;;; Gadgets
xTEXTIN 115 10 200 20 'Serial De_vice' ModemDev.tmp '' 30
GadID 410
GadHelp 'The name of your serial device driver (case sensitive)'
xCYCLER 430 10 110 20 'Serial _Speed' ModemSpeed.tmp
GadID 420
GadHelp 'Serial speed between your Amiga and modem'
CSTR '115200' 0
CSTR '57600' 1
CSTR '38400' 2
CSTR '19200' 3
CSTR '9600' 4
CSTR '4800' 5
CSTR '2400' 6
xTEXTIN 115 35 200 20 'Modem _Init' ModemInit.tmp '' 100
GadID 430
GadHelp 'Initialisation string for your modem'
xTEXTIN 430 35 110 20 'Modem _Dial' ModemDial.tmp '' 10
GadID 440
GadHelp 'Dial string for your modem - usually ATDT'
xTEXTIN 115 60 200 20 '_Tel No' PopNum.tmp '' 30
GadID 450
GadHelp 'Telephone number to connect to - usually 0845 0798112'
xTEXTIN 430 60 110 20 'M_TU' MTU.tmp '' 5
GadID 460
GadHelp 'Set to 576 for 28 or 33K modems, 1500 for 56K'
xTEXTIN 115 85 200 20 '_PPP Options' PPPopts.tmp '' 100
GadID 470
GadHelp 'Additional configuration for ppp.device - do not change without reading ppp.guide'
xTEXTIN 115 110 200 20 'Dial _Window' DialWindow.tmp '' 100
GadID 480
GadHelp 'Size of the dial information window'
xCheckBox 430 85 21 17 'P_AP' UsePAP.tmp '1' '0' OFF
GadID 490
GadHelp 'Use PAP loginns - faster but needs registered ppp.device'
xCYCLER 430 110 110 20 'TCP stack' TCPstack.tmp
GadID 495
GadHelp 'Use either AmiTCP or Miami, the other settings only apply to AmiTCP'
CSTR 'AmiTCP' 0
CSTR 'Miami' 1
;;;
;;; Buttons
xBUTTON 200 150 60 25 '_OK'
GadHelp 'Accept these settings'
PopNum = $PopNum.tmp
ModemDev = $ModemDev.tmp
MTU = $MTU.tmp
PPPoptions = $PPPoptions.tmp
ModemInit = $ModemInit.tmp
ModemDial = $ModemDial.tmp
DialWindow = $DialWindow.tmp
UsePAP = $UsePAP.tmp
TCPstack = $TCPstack.tmp
ModemSpeed = 2 ; default to 38400
DoCase $ModemSpeed.tmp
Case = 0
ModemSpeed = 115200
Break
Case = 1
ModemSpeed = 57600
Break
Case = 2
ModemSpeed.tmp = 38400
Break
Case = 3
ModemSpeed.tmp = 19200
Break
Case = 4
ModemSpeed.tmp = 9600
Break
Case = 5
ModemSpeed.tmp = 4800
Break
Case = 6
ModemSpeed.tmp = 2400
Break
EndCase
Gosub $DialerGui ExitDialer
xBUTTON 315 150 60 25 '_Cancel'
GadHelp 'Exit without changing settings'
Gosub $DialerGui ExitDialer
;;;
;;; Exit Window
xROUTINE ExitDialer
GuiClose $DialerGui
GuiOpen $PrefsGui
Return
;;;
;;; *** Address Window ***
NewFile Address.g
VarPath 'Dashboard/Prefs.g'
WINBIG 15 15 575 130 'Address Preferences'
WINTYPE 0111000
;;;
;;; On Open
xOnOPEN
Gateway.tmp = $Gateway
MailServer.tmp = $MailServer
NewsServer.tmp = $NewsServer
SMTPServer.tmp = $SMTPServer
NewsSockets.tmp = $NewsSockets
MaxTries.tmp = $MaxTries
Update $AddressGui 610 $Gateway
Update $AddressGui 620 $MailServer
Update $AddressGui 630 $SMTPServer
Update $AddressGui 640 $NewsServer
Update $AddressGui 650 $NewsSockets
Update $AddressGui 660 $MaxTries
;;;
;;; Gadgets
xTEXTIN 115 10 155 20 'Gateway' Gateway.tmp '' 20
GadID 610
GadHelp 'You should not need to change this'
xTEXTIN 115 35 155 20 'Mail Server' MailServer.tmp '' 20
GadID 620
GadHelp 'The address of the POP3 mail server'
xTEXTIN 115 60 155 20 'Send Mail To' SMTPServer.tmp '' 20
GadID 630
GadHelp 'The address to send outgoing mail'
xTEXTIN 385 10 155 20 'News Server' NewsServer.tmp '' 20
GadID 640
GadHelp 'The address of the news server'
xTEXTIN 385 35 155 20 'News Sockets' NewsSockets.tmp '' 20
GadID 650
GadHelp 'The number of sockets to use when downloading news'
xTEXTIN 385 60 155 20 'Max Retries' MaxTries.tmp '' 20
GadID 660
GadHelp 'Number of times to retry if connection with mail or news fails'
;;;
;;; Buttons
xBUTTON 200 100 60 25 '_OK'
GadHelp 'Accept these settings'
Gateway = $Gateway.tmp
MailServer = $MailServer.tmp
NewsServer = $NewsServer.tmp
SMTPServer = $SMTPServer.tmp
NewsSockets = $NewsSockets.tmp
MaxTries = $MaxTries.tmp
Gosub $AddressGui ExitAddress
xBUTTON 315 100 60 25 '_Cancel'
GadHelp 'Exit without changing settings'
Gosub $AddressGui ExitAddress
;;;
;;; Exit Window
xROUTINE ExitAddress
GuiClose $AddressGui
GuiOpen $PrefsGui
Return
;;;
;;; *** User Window ***
NEWFILE User.g
VarPath 'Dashboard/Prefs.g'
WINBIG 15 15 575 175 'User Preferences'
WINTYPE 0111000
;;;
;;; On Open
xOnOPEN
UserName.tmp = $UserName
NodeName.tmp = $NodeName
MailBox.tmp = $MailBox
DomainName.tmp = $DomainName
IPAddress.tmp = $IPAddress
Password.tmp = $Password
WWW.tmp = $WWW
FTP.tmp = $FTP
ButtonA.tmp = $ButtonA
ButtonB.tmp = $ButtonB
Update $UserGui 510 $UserName.tmp
Update $UserGui 520 $NodeName.tmp
Update $UserGui 530 $MailBox.tmp
Update $UserGui 540 $DomainName.tmp
Update $UserGui 550 $IPAddress.tmp
Update $UserGui 560 $Password.tmp
Update $UserGui 570 $WWW.tmp
Update $UserGui 575 $FTP.tmp
Update $UserGui 580 $ButtonA.tmp
Update $UserGui 585 $ButtonB.tmp
;;;
;;; Gadgets
xTEXTIN 115 10 155 20 'User Name' UserName.tmp '' 20
GadID 510
GadHelp 'The part before the @ in your email address'
xTEXTIN 115 35 155 20 'Node Name' NodeName.tmp '' 20
GadID 520
GadHelp 'The first part after the @ in your email address'
xTEXTIN 385 10 155 20 'Mailbox' MailBox.tmp '' 20
GadID 530
GadHelp 'The name of your mailbox on the POP3 server - usually the same as your Node Name'
xTEXTIN 115 60 155 20 'Domain' DomainName.tmp '' 20
GadID 540
GadHelp 'Leave at .u-net.com'
xTEXTIN 385 60 155 20 'IP Address' IPAddress.tmp '' 20
GadID 550
GadHelp 'Usually 0.0.0.0'
xTEXTIN 385 35 155 20 'Password' Password.tmp '' 20
GadID 560
GadHelp 'Your password for logging into your account and mailbox'
xTEXTIN 115 85 130 20 'WWW' WWW.tmp '' 100
GadID 570
GadHelp 'Command to start your WWW browser - uses AWeb if left blank'
xBUTTON 247 85 23 20 '?'
GadHelp 'Open a file requester to choose browser'
Extract WWW.tmp PATH Path.tmp
Extract WWW.tmp FILE File.tmp
CLI 'RequestFile drawer "$Path.tmp" file "$File.tmp" title "Path to WWW program" noicons >ENV:.temp'
if $$RETCODE = 0
WWW.tmp = $.temp
Update $UserGui 570 $WWW.tmp
endif
xTEXTIN 385 85 130 20 'FTP' FTP.tmp '' 100
GadID 575
GadHelp 'Command to start your FTP program - uses AmiFTP if left blank'
xBUTTON 517 85 23 20 '?'
GadHelp 'Open a file requester to choose FTP program'
Extract FTP.tmp PATH Path.tmp
Extract FTP.tmp FILE File.tmp
CLI 'RequestFile drawer "$Path.tmp" file "$File.tmp" title "Path to FTP program" noicons >ENV:.temp'
if $$RETCODE = 0
FTP.tmp = $.temp
Update $UserGui 575 $FTP.tmp
endif
xTEXTIN 115 110 155 20 'User Button A' ButtonA.tmp '' 50
GadID 580
GadHelp 'Text to appear in the first User Button - see Help from main menu'
xTEXTIN 385 110 155 20 'User Button B' ButtonB.tmp '' 50
GadID 585
GadHelp 'Text to appear in the second User Button - see Help from main menu'
;;;
;;; Buttons
xBUTTON 200 145 60 25 '_OK'
GadHelp 'Accept these settings'
UserName = $UserName.tmp
NodeName = $NodeName.tmp
MailBox = $MailBox.tmp
DomainName = $DomainName.tmp
IPAddress = $IPAddress.tmp
Password = $Password.tmp
ButtonA = $ButtonA.tmp
ButtonB = $ButtonB.tmp
Extract WWW.tmp UNQUOTE WWW
Extract FTP.tmp UNQUOTE FTP
Gosub $UserGui ExitUser
xBUTTON 315 145 60 25 '_Cancel'
GadHelp 'Exit without changing settings'
Gosub $UserGui ExitUser
;;;
;;; Exit Window
xROUTINE ExitUser
GuiClose $UserGui
GuiOpen $PrefsGui
Return
;;;
;;; *** FTP Window ***
NewFile FTP.g
VarPath 'Dashboard/Prefs.g'
WINBIG 15 15 575 105 'FTP Preferences'
WINTYPE 0111000
;;;
;;; On Open
xOnOPEN
AminetServer.tmp = $AminetServer
DownloadDir.tmp = $DownloadDir
AminetRoot.tmp = $AminetRoot
GetReadme.tmp = $GetReadme
Update $FTPGui 710 $AminetServer.tmp
Update $FTPGui 720 $DownloadDir.tmp
Update $FTPGui 730 $AminetRoot.tmp
Update $FTPGui 740 $GetReadme.tmp
;;;
;;; Gadgets
xTEXTIN 115 10 135 20 'AminetServer' AminetServer.tmp '' 30
GadID 710
GadHelp 'Address for Aminet downloads - uk.aminet.net is usually fastest'
;xBUTTON 247 10 23 20 '?'
; GadHelp 'Open a list of Aminet sites'
; xLISTVIEW 10 10 200 100 'Aminet servers' Server.tmp 'Wirenet:db/aminet.sites' 2 TXT
xTEXTIN 115 35 155 20 'DownloadDir' DownloadDir.tmp '' 100
GadID 720
GadHelp 'Directory to save Aminet downloads'
xTEXTIN 385 10 155 20 'AminetRoot' AminetRoot.tmp '' 30
GadID 730
GadHelp 'Path to Aminet files on server, normally left blank'
xCheckBox 385 35 21 17 'GetReadme' GetReadme.tmp '1' '0' OFF
GadID 740
GadHelp 'Collect readme file for each download'
;;;
;;; Buttons
xBUTTON 200 75 60 25 '_OK'
GadHelp 'Accept these settings'
AminetServer = $AminetServer.tmp
DownloadDir = $DownloadDir.tmp
AminetRoot = $AminetRoot.tmp
GetReadme = $GetReadme.tmp
Gosub $FTPGui ExitFTP
xBUTTON 315 75 60 25 '_Cancel'
GadHelp 'Exit without changing settings'
Gosub $FTPGui ExitFTP
;;;
;;; Exit Window
xROUTINE ExitFTP
GuiClose $FTPGui
GuiOpen $PrefsGui
Return
;;;